# coding: utf-8

"""
@version: python3.6
@author: 噢啦嘿嘿
@contact: jian.zhou@360che.com
@software: PyCharm
@file: test.py
@time: 2021/2/5 18:00
"""


l = [2,2,1,1,1,4]

def majorityElement(nums):
    for i in range(1, len(nums)):
        print(nums[0], nums[i], nums)
        nums[0] = nums[0] ^ nums[i]
        print(nums[0], nums[i], nums)
        print('-'*8)
        
    return nums[0]


print(majorityElement(l))
a = 2
b = 2
a ^= b
# print(a)